import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import './utils/rem'
import globalMixins from './mixins/global-mixins'
import store from './store'
import VueClipboard from 'vue-clipboard2'
Vue.config.productionTip = false
Vue.use(Antd)
Vue.mixin(globalMixins)
Vue.use(VueClipboard)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

// 解决 iOS 下输入法造成的问题
if (/iphone|ipod|ipad/i.test(navigator.appVersion)) {
  window.addEventListener('focusout', () => {
    setTimeout(() => {
      window.scrollTo(0, document.documentElement.scrollTop || document.body.scrollTop || 0)
    })
  })
}
